package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface LotteryMapper {
    int countByExample(LotteryCriteria example);

    int deleteByExample(LotteryCriteria example);

    @Delete({
        "delete from LOTTERY",
        "where LOTTERY_ID = #{lotteryId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer lotteryId);

    @Insert({
        "insert into LOTTERY (LOTTERY_ID, NAME, ",
        "AWARD_1, AWARD_2, ",
        "AWARD_3, AWARD_4, ",
        "AWARD_5, AWARD_6, ",
        "AWARD_7, AWARD_8, ",
        "AWARD_9, AWARD_10, ",
        "AWARD_11, AWARD_12, ",
        "CNT_1, CNT_2, CNT_3, ",
        "CNT_4, CNT_5, CNT_6, ",
        "CNT_7, CNT_8, CNT_9, ",
        "CNT_10, CNT_11, CNT_12, ",
        "CHANCE_1, CHANCE_2, ",
        "CHANCE_3, CHANCE_4, ",
        "CHANCE_5, CHANCE_6, ",
        "CHANCE_7, CHANCE_8, ",
        "CHANCE_9, CHANCE_10, ",
        "CHANCE_11, CHANCE_12, ",
        "MEM_NAME_1, MEM_NAME_2, ",
        "MEM_NAME_3)",
        "values (#{lotteryId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, ",
        "#{award1,jdbcType=VARCHAR}, #{award2,jdbcType=VARCHAR}, ",
        "#{award3,jdbcType=VARCHAR}, #{award4,jdbcType=VARCHAR}, ",
        "#{award5,jdbcType=VARCHAR}, #{award6,jdbcType=VARCHAR}, ",
        "#{award7,jdbcType=VARCHAR}, #{award8,jdbcType=VARCHAR}, ",
        "#{award9,jdbcType=VARCHAR}, #{award10,jdbcType=VARCHAR}, ",
        "#{award11,jdbcType=VARCHAR}, #{award12,jdbcType=VARCHAR}, ",
        "#{cnt1,jdbcType=INTEGER}, #{cnt2,jdbcType=INTEGER}, #{cnt3,jdbcType=INTEGER}, ",
        "#{cnt4,jdbcType=INTEGER}, #{cnt5,jdbcType=INTEGER}, #{cnt6,jdbcType=INTEGER}, ",
        "#{cnt7,jdbcType=INTEGER}, #{cnt8,jdbcType=INTEGER}, #{cnt9,jdbcType=INTEGER}, ",
        "#{cnt10,jdbcType=INTEGER}, #{cnt11,jdbcType=INTEGER}, #{cnt12,jdbcType=INTEGER}, ",
        "#{chance1,jdbcType=INTEGER}, #{chance2,jdbcType=INTEGER}, ",
        "#{chance3,jdbcType=INTEGER}, #{chance4,jdbcType=INTEGER}, ",
        "#{chance5,jdbcType=INTEGER}, #{chance6,jdbcType=INTEGER}, ",
        "#{chance7,jdbcType=INTEGER}, #{chance8,jdbcType=INTEGER}, ",
        "#{chance9,jdbcType=INTEGER}, #{chance10,jdbcType=INTEGER}, ",
        "#{chance11,jdbcType=INTEGER}, #{chance12,jdbcType=INTEGER}, ",
        "#{memName1,jdbcType=VARCHAR}, #{memName2,jdbcType=VARCHAR}, ",
        "#{memName3,jdbcType=VARCHAR})"
    })
    int insert(Lottery record);

    int insertSelective(Lottery record);

    List<Lottery> selectByExample(LotteryCriteria example);

    @Select({
        "select",
        "LOTTERY_ID, NAME, AWARD_1, AWARD_2, AWARD_3, AWARD_4, AWARD_5, AWARD_6, AWARD_7, ",
        "AWARD_8, AWARD_9, AWARD_10, AWARD_11, AWARD_12, CNT_1, CNT_2, CNT_3, CNT_4, ",
        "CNT_5, CNT_6, CNT_7, CNT_8, CNT_9, CNT_10, CNT_11, CNT_12, CHANCE_1, CHANCE_2, ",
        "CHANCE_3, CHANCE_4, CHANCE_5, CHANCE_6, CHANCE_7, CHANCE_8, CHANCE_9, CHANCE_10, ",
        "CHANCE_11, CHANCE_12, MEM_NAME_1, MEM_NAME_2, MEM_NAME_3",
        "from LOTTERY",
        "where LOTTERY_ID = #{lotteryId,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    Lottery selectByPrimaryKey(Integer lotteryId);

    int updateByExampleSelective(@Param("record") Lottery record, @Param("example") LotteryCriteria example);

    int updateByExample(@Param("record") Lottery record, @Param("example") LotteryCriteria example);

    int updateByPrimaryKeySelective(Lottery record);

    @Update({
        "update LOTTERY",
        "set NAME = #{name,jdbcType=VARCHAR},",
          "AWARD_1 = #{award1,jdbcType=VARCHAR},",
          "AWARD_2 = #{award2,jdbcType=VARCHAR},",
          "AWARD_3 = #{award3,jdbcType=VARCHAR},",
          "AWARD_4 = #{award4,jdbcType=VARCHAR},",
          "AWARD_5 = #{award5,jdbcType=VARCHAR},",
          "AWARD_6 = #{award6,jdbcType=VARCHAR},",
          "AWARD_7 = #{award7,jdbcType=VARCHAR},",
          "AWARD_8 = #{award8,jdbcType=VARCHAR},",
          "AWARD_9 = #{award9,jdbcType=VARCHAR},",
          "AWARD_10 = #{award10,jdbcType=VARCHAR},",
          "AWARD_11 = #{award11,jdbcType=VARCHAR},",
          "AWARD_12 = #{award12,jdbcType=VARCHAR},",
          "CNT_1 = #{cnt1,jdbcType=INTEGER},",
          "CNT_2 = #{cnt2,jdbcType=INTEGER},",
          "CNT_3 = #{cnt3,jdbcType=INTEGER},",
          "CNT_4 = #{cnt4,jdbcType=INTEGER},",
          "CNT_5 = #{cnt5,jdbcType=INTEGER},",
          "CNT_6 = #{cnt6,jdbcType=INTEGER},",
          "CNT_7 = #{cnt7,jdbcType=INTEGER},",
          "CNT_8 = #{cnt8,jdbcType=INTEGER},",
          "CNT_9 = #{cnt9,jdbcType=INTEGER},",
          "CNT_10 = #{cnt10,jdbcType=INTEGER},",
          "CNT_11 = #{cnt11,jdbcType=INTEGER},",
          "CNT_12 = #{cnt12,jdbcType=INTEGER},",
          "CHANCE_1 = #{chance1,jdbcType=INTEGER},",
          "CHANCE_2 = #{chance2,jdbcType=INTEGER},",
          "CHANCE_3 = #{chance3,jdbcType=INTEGER},",
          "CHANCE_4 = #{chance4,jdbcType=INTEGER},",
          "CHANCE_5 = #{chance5,jdbcType=INTEGER},",
          "CHANCE_6 = #{chance6,jdbcType=INTEGER},",
          "CHANCE_7 = #{chance7,jdbcType=INTEGER},",
          "CHANCE_8 = #{chance8,jdbcType=INTEGER},",
          "CHANCE_9 = #{chance9,jdbcType=INTEGER},",
          "CHANCE_10 = #{chance10,jdbcType=INTEGER},",
          "CHANCE_11 = #{chance11,jdbcType=INTEGER},",
          "CHANCE_12 = #{chance12,jdbcType=INTEGER},",
          "MEM_NAME_1 = #{memName1,jdbcType=VARCHAR},",
          "MEM_NAME_2 = #{memName2,jdbcType=VARCHAR},",
          "MEM_NAME_3 = #{memName3,jdbcType=VARCHAR}",
        "where LOTTERY_ID = #{lotteryId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Lottery record);
}